package org.jeecg.modules.wms.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.util.List;

/**
 * 分批次入库执行VO
 */
@Data
@ApiModel(value = "BatchInboundExecuteVO", description = "分批次入库执行VO")
public class BatchInboundExecuteVO {

    @ApiModelProperty(value = "入库单ID", required = true)
    @NotBlank(message = "入库单ID不能为空")
    private String inboundId;

    @ApiModelProperty(value = "入库明细列表", required = true)
    @NotEmpty(message = "入库明细不能为空")
    @Valid
    private List<BatchInboundDetailVO> details;

    /**
     * 分批次入库明细VO
     */
    @Data
    @ApiModel(value = "BatchInboundDetailVO", description = "分批次入库明细VO")
    public static class BatchInboundDetailVO {

        @ApiModelProperty(value = "入库明细ID", required = true)
        @NotBlank(message = "入库明细ID不能为空")
        private String detailId;

        @ApiModelProperty(value = "仓库ID", required = true)
        @NotBlank(message = "仓库ID不能为空")
        private String warehouseId;

        @ApiModelProperty(value = "库位ID", required = true)
        @NotBlank(message = "库位ID不能为空")
        private String locationId;

        @ApiModelProperty(value = "入库数量", required = true)
        @NotNull(message = "入库数量不能为空")
        @Positive(message = "入库数量必须大于0")
        private Integer quantity;

        @ApiModelProperty(value = "窗型系列")
        private String windowSeries;

        @ApiModelProperty(value = "窗型编号")
        private String windowNo;

        @ApiModelProperty(value = "窗型颜色")
        private String windowColor;
    }
}
